package blog.beans;

/**
 * @author johdah <info@johandahlberg.com>
 */
public class User implements java.io.Serializable {
    private Integer UId;
    private String password;
    private String username;

    public User() {
        
    }

    public User(String password, String username) {
        this.password = password;
        this.username = username;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof User)) {
            return false;
        }
        User other = (User) object;
        if ((this.UId == null && other.UId != null) || (this.UId != null && !this.UId.equals(other.UId))) {
            return false;
        }
        return true;
    }
   
    public Integer getUId() {
        return this.UId;
    }
    
    public String getPassword() {
        return this.password;
    }
    
    public String getUsername() {
        return this.username;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (UId != null ? UId.hashCode() : 0);
        return hash;
    }
    
    public void setUId(Integer UId) {
        this.UId = UId;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public String toString() {
        return "blog.beans.User[ uId=" + UId + " ]";
    }
}